home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VIG-AC10.ZIP / APPCENTR.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-07-01  |  4KB  |  307 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Boolean  BOOLEAN001
  20.     Boolean  BOOLEAN002
  21.     Boolean  BOOLEAN003
  22.     Integer  INTEGER001
  23.     Integer  INTEGER002
  24.     Integer  INTEGER003
  25.     Integer  INTEGER004
  26.     Integer  INTEGER005
  27.     Integer  INTEGER006
  28.     Integer  INTEGER007
  29.     Integer  TINTEGER008(1)
  30.     String   TSTRING001(10,5)
  31.     String   STRING002
  32.     String   STRING003
  33.     String   STRING004
  34.     String   STRING005
  35.     String   STRING006
  36.     String   STRING007
  37.     String   STRING008
  38.  
  39. ;------------------------------------------------------------------------------
  40.  
  41.     STRING005 = "@X08Application Center v1.0 by ViGilante [PWA]    /A=Up, /Z=Down, CR/Enter=Select"
  42.     For INTEGER005 = 1 To Len(STRING005) Step 2
  43.         INTEGER007 = INTEGER007 + Asc(Mid(STRING005, INTEGER005, 1))
  44.     Next
  45.     If (INTEGER007 <> 3187) End
  46.     StartDisp 1
  47.     Gosub LABEL011
  48.     FOpen 1, PPEPath() + "appcentr.cnf", 0, 0
  49.     FGet 1, INTEGER001
  50.     FGet 1, STRING007
  51.     FGet 1, INTEGER006
  52.     For INTEGER005 = 1 To INTEGER006
  53.         FGet 1, TSTRING001(INTEGER005, 0)
  54.         Tokenize TSTRING001(INTEGER005, 0)
  55.         TSTRING001(INTEGER005, 1) = GetToken()
  56.         TSTRING001(INTEGER005, 2) = GetToken()
  57.         TSTRING001(INTEGER005, 3) = GetToken()
  58.         TSTRING001(INTEGER005, 5) = GetToken()
  59.         FGet 1, TSTRING001(INTEGER005, 0)
  60.         FGet 1, TSTRING001(INTEGER005, 4)
  61.         If (Lower(TSTRING001(INTEGER005, 4)) == "sysop") TSTRING001(INTEGER005, 4) = Upper(ReadLine(PCBDat(), 2))
  62.     Next
  63.     FClose 1
  64.     INTEGER005 = INTEGER006
  65.     Gosub LABEL004
  66.     :LABEL001
  67.     If (BOOLEAN001) Goto LABEL003
  68.     STRING002 = Lower(Left(Inkey(), 1))
  69.     If (InStr("drz", STRING002) > 0) Then
  70.         Gosub LABEL005
  71.         Inc INTEGER005
  72.         If (INTEGER005 > INTEGER006) INTEGER005 = 1
  73.         Gosub LABEL004
  74.     ElseIf (InStr("ula", STRING002) > 0) Then
  75.         Gosub LABEL005
  76.         Dec INTEGER005
  77.         If (INTEGER005 < 1) INTEGER005 = INTEGER006
  78.         Gosub LABEL004
  79.     ElseIf (STRING002 == Chr(13)) Then
  80.         If (INTEGER005 == INTEGER006) Then
  81.             BOOLEAN001 = 1
  82.             Gosub LABEL005
  83.             Goto LABEL002
  84.         Endif
  85.         Gosub LABEL006
  86.         Gosub LABEL011
  87.         Gosub LABEL004
  88.     Endif
  89.     :LABEL002
  90.     Goto LABEL001
  91.     :LABEL003
  92.     StartDisp 2
  93.     End
  94.     :LABEL004
  95.     AnsiPos TSTRING001(INTEGER005, 1), TSTRING001(INTEGER005, 2)
  96.     STRING003 = ScrText(TSTRING001(INTEGER005, 1), TSTRING001(INTEGER005, 2), TSTRING001(INTEGER005, 3), 1)
  97.     Print TSTRING001(INTEGER005, 0)
  98.     AnsiPos TSTRING001(INTEGER005, 1), TSTRING001(INTEGER005, 2)
  99.     Return
  100.     :LABEL005
  101.     AnsiPos TSTRING001(INTEGER005, 1), TSTRING001(INTEGER005, 2)
  102.     Print STRING003
  103.     AnsiPos TSTRING001(INTEGER005, 1), TSTRING001(INTEGER005, 2)
  104.     Return
  105.     :LABEL006
  106.     If (Exist(PPEPath() + "app." + String(INTEGER005))) Then
  107.         BOOLEAN003 = 1
  108.         Color 7
  109.         Cls
  110.         If (Exist(PPEPath() + "intro." + String(INTEGER005))) Then
  111.             DispFile PPEPath() + "intro." + String(INTEGER005), 0
  112.             Wait
  113.         Endif
  114.         STRING008 = ReadLine(PPEPath() + "app." + String(INTEGER005), 1)
  115.         If (Exist(Right(STRING008, Len(STRING008) - 1))) Then
  116.             Call Right(STRING008, Len(STRING008) - 1)
  117.             Wait
  118.             Goto LABEL010
  119.         Endif
  120.         FCreate 1, PPEPath() + "temp." + String(PcbNode()), 1, 0
  121.         If (Lower(Left(STRING007, 1)) == "y") FPut 1, "@WAIT@"
  122.         FPut 1, "@POFF@"
  123.         FClose 1
  124.         OpenCap PPEPath() + "temp." + String(PcbNode()), BOOLEAN002
  125.         FOpen 1, PPEPath() + "app." + String(INTEGER005), 0, 0
  126.         :LABEL007
  127.         If (Ferr(1)) Goto LABEL009
  128.         FGet 1, STRING004
  129.         While (InStr(STRING004, "*") <> 0) Do
  130.             INTEGER004 = InStr(STRING004, "*")
  131.             Print Left(STRING004, INTEGER004 - 1)
  132.             STRING004 = Right(STRING004, Len(STRING004) - INTEGER004)
  133.             INTEGER002 = GetX()
  134.             INTEGER003 = GetY()
  135.             INTEGER007 = 1
  136.             STRING002 = ""
  137.             While (STRING002 <> Chr(13)) Do
  138.                 STRING002 = Inkey()
  139.                 If ((STRING002 == Chr(8)) && (INTEGER007 > 1)) Then
  140.                     Print Chr(8) + " " + Chr(8)
  141.                     Dec INTEGER007
  142.                     Continue
  143.                 Endif
  144.                 If (Asc(STRING002) > 31) Then
  145.                     If (((Len(STRING002) > 1) || (ScrText(INTEGER002 + INTEGER007, INTEGER003, 1, 0) <> " ")) || (INTEGER002 + INTEGER007 > 80)) Then
  146.                         Beep
  147.                         Goto LABEL008
  148.                     Endif
  149.                     Print STRING002
  150.                     Inc INTEGER007
  151.                     :LABEL008
  152.                     Continue
  153.                 Endif
  154.                 If ((STRING002 <> "") && (Asc(STRING002) <> 13)) Beep
  155.             EndWhile
  156.             If (BOOLEAN003) Then
  157.                 BOOLEAN003 = 0
  158.                 STRING006 = Upper(ScrText(INTEGER002, INTEGER003, GetX() - INTEGER002, 0))
  159.             Endif
  160.         EndWhile
  161.         PrintLn STRING004
  162.         Goto LABEL007
  163.         :LABEL009
  164.         FClose 1
  165.         Print Chr(27) + "[" + String(INTEGER001 - 2) + ";1H"
  166.         CloseCap 
  167.         Message TSTRING001(INTEGER005, 5), Upper(TSTRING001(INTEGER005, 4)), Upper(STRING006), StripAtx(TSTRING001(INTEGER005, 0)), "R", 0, 0, 0, PPEPath() + "temp." + String(PcbNode())
  168.         Delete PPEPath() + "temp." + String(PcbNode())
  169.         AnsiPos 1, 23
  170.         Wait
  171.     Endif
  172.     :LABEL010
  173.     Return
  174.     :LABEL011
  175.     DispFile PPEPath() + "appcentr.pcb", 0
  176.     AnsiPos 40 - Len(StripAtx(STRING005)) / 2, 1
  177.     Print STRING005
  178.     Return
  179.     If (0) Then
  180.         Brag
  181.         FFlush 1
  182.         FReAltUser
  183.         MouseReg 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
  184.         Redim TINTEGER008, 2
  185.         Sort TINTEGER008, TINTEGER008
  186.         Print FlagCnt()
  187.         Print HiMsgNum()
  188.         Print KbdBufSize()
  189.         Print KbdFilUsed()
  190.         Print LoMsgNum()
  191.         Print PPLBufSize()
  192.     Endif
  193.  
  194. ;------------------------------------------------------------------------------
  195. ;
  196. ; Usage report (before postprocessing)
  197. ;
  198. ; ■ Statements used :
  199. ;
  200. ;    2       End
  201. ;    1       Cls
  202. ;    3       Wait
  203. ;    1       Color 
  204. ;    31      Goto 
  205. ;    28      Let 
  206. ;    13      Print 
  207. ;    1       PrintLn 
  208. ;    24      If 
  209. ;    2       DispFile 
  210. ;    1       FCreate 
  211. ;    2       FOpen 
  212. ;    3       FClose 
  213. ;    7       FGet 
  214. ;    2       FPut 
  215. ;    2       StartDisp 
  216. ;    1       Delete 
  217. ;    10      Gosub 
  218. ;    4       Return
  219. ;    2       Inc 
  220. ;    2       Dec 
  221. ;    1       Tokenize 
  222. ;    2       Beep
  223. ;    1       Call 
  224. ;    6       AnsiPos 
  225. ;    1       OpenCap 
  226. ;    1       CloseCap 
  227. ;    1       Message 
  228. ;    1       FFlush 
  229. ;    1       Redim 
  230. ;    1       Sort 
  231. ;    1       MouseReg 
  232. ;    1       Brag
  233. ;    1       FReAltUser
  234. ;
  235. ;
  236. ; ■ Functions used :
  237. ;
  238. ;    1       /
  239. ;    30      +
  240. ;    7       -
  241. ;    5       ==
  242. ;    6       <>
  243. ;    3       <
  244. ;    2       <=
  245. ;    7       >
  246. ;    4       >=
  247. ;    18      !
  248. ;    6       &&
  249. ;    4       ||
  250. ;    7       Len(
  251. ;    3       Lower()
  252. ;    4       Upper()
  253. ;    1       Mid()
  254. ;    3       Left()
  255. ;    3       Right()
  256. ;    1       Ferr()
  257. ;    6       Chr()
  258. ;    3       Asc()
  259. ;    4       InStr()
  260. ;    2       StripAtx()
  261. ;    2       Inkey()
  262. ;    10      String()
  263. ;    1       PCBDat()
  264. ;    11      PPEPath()
  265. ;    4       PcbNode()
  266. ;    2       ReadLine()
  267. ;    4       GetToken()
  268. ;    3       Exist()
  269. ;    2       GetX()
  270. ;    1       GetY()
  271. ;    3       ScrText()
  272. ;    1       FlagCnt()
  273. ;    1       KbdBufSize()
  274. ;    1       PPLBufSize()
  275. ;    1       KbdFilUsed()
  276. ;    1       LoMsgNum()
  277. ;    1       HiMsgNum()
  278. ;
  279. ;------------------------------------------------------------------------------
  280. ;
  281. ; Analysis flags : Cd
  282. ;
  283. ; C - Call child PPE ■ 3
  284. ;     This is usually normal, but may be a tricky way to launch some
  285. ;     sysop-only commands.
  286. ;     ■ Search for : CALL
  287. ;
  288. ; d - Access PCBOARD.DAT ■ 2
  289. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  290. ;     for many PPE so they can find various informations on the system
  291. ;     (system paths, max number of lines in messages, ...) but it may also
  292. ;     be a way to gather vital informations.
  293. ;     ■ Search for : PCBDAT()
  294. ;
  295. ;------------------------------------------------------------------------------
  296. ;
  297. ; Postprocessing report
  298. ;
  299. ;    2       For/Next
  300. ;    2       While/EndWhile
  301. ;    12      If/Then or If/Then/Else
  302. ;    0       Select Case
  303. ;
  304. ;------------------------------------------------------------------------------
  305. ;                 AEGiS Corp - Break the routines, code against the machines!
  306. ;------------------------------------------------------------------------------
  307.